<template>
	<view class="page">
		<view class="page-container">
			<view class="page-item" v-for="(item, itemIndex) of list" :key="itemIndex">
				<view class="page-item-left">
					<view><image class="viimage" :src="item.headimg" mode=""></image></view>
					<view class="page-item-left-r">
						<view class="">{{item.nickname}}</view>
						<view class="preview">{{item.mesage}}</view>
					</view>
				</view>
				<view class="page-item-right">{{item.datetime}}</view>
			</view>
		</view>
		<uni-load-more :status="loadMoreStatus"></uni-load-more>
	</view>
</template>

<script>
	import data from '@/data/ucenter/message-lists/message-lists.js';
	
	export default {
		data() {
			return {
				list: [],
				loadMoreStatus : "more",
				pageData:{
					last_page:1,
					total:1
				},
				postData:{
					current_page:1,
					per_page:10,
					page:1,
					type:null,
				},
			}
		},
		async created() {
			const MessageLists = data.getMessageLists();
			this.list = await MessageLists;
		},
		onReachBottom() {
			
		},
		methods: {
			
		}
	}
</script>

<style lang="scss" scoped>
	.page{
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		background-color: $uni-bg-color-hover;
	}
	.page-container{
		display: flex;
		flex-direction: column;
		margin-top: $uni-spacing-col-base;
		background-color: $uni-bg-color;
		border-radius: 10px;
		padding: 0rpx 20rpx;
	}
	.page-item{
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		border-bottom: 1px solid $uni-bg-color-grey;
		font-size: $uni-font-size-base;
		height: 150rpx;
	}
	.viimage{
		width: 90rpx;
		height: 90rpx;
		border-radius: $uni-border-radius-base;
		margin-right: 18rpx;
	}
	.page-item-left{
		display: flex;
		flex-direction: row;
		justify-content: space-between;
	}
	.page-item-left-r{
		display: flex;
		flex-direction: column;
	}
	.preview{
		font-size: $uni-font-size-sm;
		margin-top: 10rpx;
		color: $uni-text-color-grey;
	}
</style>
